<template>
  <input @keyup="keyEvent" />
</template>

<script lang="ts">
import { reactive, ref } from "vue";
export default {
  setup() {
    function keyEvent(e) {
      console.log("key:" + e.key, "code:" + e.code, "keyCode:" + e.keyCode);
    }

    return { keyEvent };
  },
};
</script>
<style scoped>
.div1 {
  height: 200px;
  overflow: auto;
  width: 300px;
  background-color: lightgoldenrodyellow;
}
.div1 ul li {
  height: 300px;
  line-height: 300px;
}
</style>
